<template>
  <!-- <div>
  <h2>login--login</h2>
 
  </div> -->
  <div class="login">
    <div class="login-box">
      <el-tabs v-model="activeName">

         <el-tab-pane name="pass">
          <span slot="label">
            <i class="el-icon-lock"></i> 密码登录
          </span>
          <loginpass />
        </el-tab-pane>
        <el-tab-pane name="code">
          <span slot="label">
            <i class="el-icon-mobile-phone"></i> 验证码登录
          </span>
          <logincode/>
        </el-tab-pane>
        <el-tab-pane name="register">
          <span slot="label">
            <i class="el-icon-user-solid"></i> 注册
          </span>
          <register />
        </el-tab-pane>
        
      </el-tabs>
    </div>
  </div>
  
</template>




<script>
import loginpass from "@/components/loginpass.vue";
import logincode from "@/components/logincode.vue";
import register from "@/components/register.vue";
import {gettoken} from '@/api'
export default {
    components:{
        loginpass,
        logincode,
        register
    },
    data(){
        return {
            activeName:'pass'
        }
    },
    methods:{
    },
    mounted(){
      gettoken()
      .then(res=>{
        if(res.type){
        }
      })
    }
};
</script>





<style lang="scss" scoped>
::v-deep .el-tabs__nav {
  width: 100%;
  display: flex;
}
::v-deep .el-tabs__item {
  flex: 1;
  text-align: center;
}
.login {
  width: 100%;
  height: 100%;
  // background-image: url(http://data.1000phone.net/static/img/login-bgimg.105cd7b.jpg);
  //   background-image: url(../assets/images/cute.jpg);
  background-image: url(../assets/images/7.jpg);
  background-size: 120% 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  overflow: hidden;
  position: relative;
  animation: move 20s linear infinite;
  -webkit-animation: move 20s linear infinite;
}

@keyframes move {
  0% {
    background-position: -100px 0;
  }
  50% {
    background-position: 0 0;
  }
  100% {
    background-position: -100px 0;
  }
}

.login-box {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 420px;
  height: 370px;
  border: 2px solid darkkhaki;
  // background: rgba(246, 248, 248, 0.4);
  background-color: #fff;
  border-radius: 10px;
  animation: zoomInDown 0.8s;
}
</style>